package com.example.hyw.szysteam.myEmail;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
/**
 * Created by HYW on 2018/5/19.
 */

public class MyAuthenticator extends Authenticator{

    String userName = null;
    String password = null;

    public MyAuthenticator() {
    }
    public MyAuthenticator(String username, String password) {
        this.userName = username;
        this.password = password;
    }

    protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(userName, password);
    }
}
